<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('数据库备份详情列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
<!--                            <li>-->
<!--                                <label>备份开始时间：</label>-->
<!--                                <input type="text" name="taskStartTime"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>备份结束时间：</label>-->
<!--                                <input type="text" name="taskEndTime"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>备份文件名称：</label>-->
<!--                                <input type="text" name="fileName"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>备份文件目录：</label>-->
<!--                                <input type="text" name="filePath"/>-->
<!--                            </li>-->
                            <li>
                                <label>备份状态：</label>
                                <input type="text" name="state"/>
                            </li>
<!--                            <li>-->
<!--                                <label>预留1：</label>-->
<!--                                <input type="text" name="spare1"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>预留2：</label>-->
<!--                                <input type="text" name="spare2"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>预留3：</label>-->
<!--                                <input type="text" name="spare3"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>预留4：</label>-->
<!--                                <input type="text" name="spare4"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>预留5：</label>-->
<!--                                <input type="text" name="spare5"/>-->
<!--                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;刷新</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bak:info:add">
                    <i class="fa fa-plus"></i> 手动备份
                </a>
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bak:info:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bak:info:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bak:info:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('bak:info:edit')}]];
        var removeFlag = [[${@permission.hasPermi('bak:info:remove')}]];
        var prefix = ctx + "bak/info";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "数据库备份详情",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '',
                    visible: false
                },
                {
                    field: 'taskStartTime',
                    title: '备份开始时间'
                },
                {
                    field: 'taskEndTime',
                    title: '备份结束时间'
                },
                {
                    field: 'fileName',
                    title: '备份文件名称'
                },
                {
                    field: 'filePath',
                    title: '备份文件目录'
                },
                {
                    field: 'state',
                    title: '备份状态',
                    formatter: function (value, row, index)
                    {
                        if (value === "成功") { return "<strong><font color=\"green\">" + value+"</font></strong>"; }
                        else {return "<strong><font color=\"red\">" + value+"</font></strong>";}
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>